package com.luhuiguo.cms.server.service;

import java.util.List;

import com.luhuiguo.cms.shared.model.ArticleModel;
import com.luhuiguo.cms.shared.model.AttachmentModel;
import com.luhuiguo.cms.shared.model.ChannelModel;

public interface CmsService {

    String abbreviate(String str, int maxWidth);

    String resolvePath(String base, String path);

    ChannelModel resolveChannel(ChannelModel base, String path);

    String getName();

    ChannelModel getChannel(Long id);

    ChannelModel getChannelByPath(String path);

    ChannelModel getChannelByResolvePath(String base, String path);

    List<ChannelModel> getChannels(Long parentId);

    List<ChannelModel> getTopChannels(Long parentId, int limit);

    List<ChannelModel> getBreadcrumb(Long channelId);

    ArticleModel getArticle(Long id);

    List<AttachmentModel> getAttachments(Long articleId);

    List<AttachmentModel> getImages(Long articleId);

    List<ArticleModel> getArticles(Long channelId, int start, int limit);

    int getArticleCount(Long channelId);

    List<AttachmentModel> getSlideShow(int grade,int limit);

}
